package com.hl.pojo;

@SuppressWarnings("all")
public class EmployeeHeadshipId implements java.io.Serializable {

	// Fields

	private Employee employee;
	private DeptHeadship deptHeadship;

	// Constructors

	/** default constructor */
	public EmployeeHeadshipId() {
	}

	/** full constructor */
	public EmployeeHeadshipId(Employee employee, DeptHeadship deptHeadship) {
		this.employee = employee;
		this.deptHeadship = deptHeadship;
	}

	// Property accessors

	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public DeptHeadship getDeptHeadship() {
		return this.deptHeadship;
	}

	public void setDeptHeadship(DeptHeadship deptHeadship) {
		this.deptHeadship = deptHeadship;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EmployeeHeadshipId))
			return false;
		EmployeeHeadshipId castOther = (EmployeeHeadshipId) other;

		return ((this.getEmployee() == castOther.getEmployee()) || (this.getEmployee() != null && castOther.getEmployee() != null && this.getEmployee().equals(
				castOther.getEmployee())))
				&& ((this.getDeptHeadship() == castOther.getDeptHeadship()) || (this.getDeptHeadship() != null && castOther.getDeptHeadship() != null && this.getDeptHeadship()
						.equals(castOther.getDeptHeadship())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getEmployee() == null ? 0 : this.getEmployee().hashCode());
		result = 37 * result + (getDeptHeadship() == null ? 0 : this.getDeptHeadship().hashCode());
		return result;
	}

}